LL FLASH Functions

LL FLASH Configuration

group FLASH_LL_EF_Configuration

Functions

void LL_FLASH_SetLatency ( FLASH_TypeDef * flashx , uint32_t latency )

Set Flash latency.

Reference Manual to LL API cross reference (Register Field Functions)

ACR LATENCY LL_FLASH_SetLatency

Parameters :
uint32_t LL_FLASH_GetLatency ( const FLASH_TypeDef * flashx )

Get Flash latency.

Reference Manual to LL API cross reference (Register Field Functions)

ACR LATENCY LL_FLASH_GetLatency

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_SetProgrammingDelay ( FLASH_TypeDef * flashx , uint32_t delay )

Set Flash programming delay.

Reference Manual to LL API cross reference (Register Field Functions)

ACR WRHIGHFREQ LL_FLASH_SetProgrammingDelay

Parameters :
uint32_t LL_FLASH_GetProgrammingDelay ( const FLASH_TypeDef * flashx )

Get Flash programming delay.

Reference Manual to LL API cross reference (Register Field Functions)

ACR WRHIGHFREQ LL_FLASH_GetProgrammingDelay

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_EnablePrefetch ( FLASH_TypeDef * flashx )

Enable flash prefetch.

Reference Manual to LL API cross reference (Register Field Functions)

ACR PRFTEN LL_FLASH_EnablePrefetch

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisablePrefetch ( FLASH_TypeDef * flashx )

Disable flash prefetch.

Reference Manual to LL API cross reference (Register Field Functions)

ACR PRFTEN LL_FLASH_DisablePrefetch

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledPrefetch ( const FLASH_TypeDef * flashx )

Check if the flash prefetch is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

ACR PRFTEN LL_FLASH_IsEnabledPrefetch

Parameters :

flashx – FLASH instance.

Return values :

State – of flash prefetch (1 enabled / 0 disabled).

void LL_FLASH_SetEmptyBootLocation ( FLASH_TypeDef * flashx , uint32_t empty_status )

Set Flash boot location empty status.

Reference Manual to LL API cross reference (Register Field Functions)

ACR EMPTY LL_FLASH_SetEmptyBootLocation

Parameters :
uint32_t LL_FLASH_GetEmptyBootLocation ( const FLASH_TypeDef * flashx )

Get Flash boot location empty status.

Reference Manual to LL API cross reference (Register Field Functions)

ACR EMPTY LL_FLASH_GetEmptyBootLocation

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_SetUnlockKey ( FLASH_TypeDef * flashx , uint32_t key )

Set the flash unlock key.

Reference Manual to LL API cross reference (Register Field Functions)

KEYR KEY/SECKEY LL_FLASH_SetUnlockKey

Parameters :
void LL_FLASH_OB_SetUnlockKey ( FLASH_TypeDef * flashx , uint32_t key )

Set the flash option bytes unlock key.

Reference Manual to LL API cross reference (Register Field Functions)

OPTKEYR OPTKEY LL_FLASH_OB_SetUnlockKey

Parameters :
uint32_t LL_FLASH_ReadFlag_OP ( const FLASH_TypeDef * flashx , const uint32_t flags )

Read the state of selected operation status flags.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR DATA_OP|BK_OP|OTP_OP LL_FLASH_ReadFlag_OP

Parameters :
Return values :

Returned – value : state of selected operation status flags.

uint32_t LL_FLASH_IsActiveFlag_DATA_OP ( const FLASH_TypeDef * flashx )

Get the flash interrupted operation data flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR DATA_OP LL_FLASH_IsActiveFlag_DATA_OP

Parameters :

flashx – FLASH instance.

Return values :

State – of interrupted operation data flash flag (1: interrupt from data flash / 0: not from data flash).

uint32_t LL_FLASH_IsActiveFlag_BK_OP ( const FLASH_TypeDef * flashx )

Get the flash interrupted operation bank.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR BK_OP LL_FLASH_IsActiveFlag_BK_OP

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : the flash interrupted operation bank (0: bank1 / 1: bank2).

uint32_t LL_FLASH_IsActiveFlag_OTP_OP ( const FLASH_TypeDef * flashx )

Get the flash interrupted operation OTP flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR OTP_OP LL_FLASH_IsActiveFlag_OTP_OP

Parameters :

flashx – FLASH instance.

Return values :

State – of interrupted operation OTP flash flag (1: interrupt from OTP flash / 0: not from OTP flash).

uint32_t LL_FLASH_GetOperInterruptedAddressOffset ( const FLASH_TypeDef * flashx )

Get the flash interrupted operation address offset.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR ADDR_OP LL_FLASH_GetOperInterruptedAddressOffset

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : the flash interrupted operation address offset.

uint32_t LL_FLASH_GetOperInterruptedCode ( const FLASH_TypeDef * flashx )

Get the flash interrupted operation code.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR CODE_OP LL_FLASH_GetOperInterruptedCode

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_Lock ( FLASH_TypeDef * flashx )

Lock the flash option bytes control access registers.

Reference Manual to LL API cross reference (Register Field Functions)

OPTCR OPTLOCK LL_FLASH_OB_Lock

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsLocked ( const FLASH_TypeDef * flashx )

Check the flash option bytes control access registers lock state.

Reference Manual to LL API cross reference (Register Field Functions)

OPTCR OPTLOCK LL_FLASH_OB_IsLocked

Parameters :

flashx – FLASH instance.

Return values :

State – of flash option bytes lock (1 locked / 0 unlocked).

void LL_FLASH_OB_StartModification ( FLASH_TypeDef * flashx )

Start the flash option bytes modification.

Reference Manual to LL API cross reference (Register Field Functions)

OPTCR OPTSTRT LL_FLASH_OB_StartModification

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsBankSwapped ( const FLASH_TypeDef * flashx )

Check the flash option bytes control access registers bank swap state.

Reference Manual to LL API cross reference (Register Field Functions)

OPTCR SWAP_BANK LL_FLASH_OB_IsBankSwapped

Parameters :

flashx – FLASH instance.

Return values :

State – of flash option bytes bank swap (1 swapped / 0 not swapped).

LL FLASH Flag Management

group FLASH_LL_EF_FLAG_Management

Functions

uint32_t LL_FLASH_IsActiveFlag ( const FLASH_TypeDef * flashx , uint32_t flags )

Check if any of the selected flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR BSY|WBNE|DBNE LL_FLASH_IsActiveFlag

Parameters :
Return values :

State – of selected flag (1 if at least one is active / 0 if none of the selected flags are active).

uint32_t LL_FLASH_ReadFlag ( const FLASH_TypeDef * flashx , uint32_t flags )

Read the state of selected flash operation error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR EOP/WRPERR/PGSERR/STRBERR/INCERR/OPTCHANGEERR LL_FLASH_ReadFlag

Parameters :
Return values :

State – of selected flags (1 active / 0 not active).

void LL_FLASH_ClearFlag ( FLASH_TypeDef * flashx , uint32_t flags )

Clear the flash operation error flag.

Reference Manual to LL API cross reference (Register Field Functions)

SR EOP/WRPERR/PGSERR/STRBERR/INCERR/OPTCHANGEERR LL_FLASH_ClearFlag

Parameters :
uint32_t LL_FLASH_IsActiveFlag_BSY ( const FLASH_TypeDef * flashx )

Check if the flash busy flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR BSY LL_FLASH_IsActiveFlag_BSY

Parameters :

flashx – FLASH instance.

Return values :

State – of BSY flag (1 active / 0 not active).

uint32_t LL_FLASH_IsActiveFlag_WBNE ( const FLASH_TypeDef * flashx )

Check if the write buffer not empty flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR WBNE LL_FLASH_IsActiveFlag_WBNE

Parameters :

flashx – FLASH instance.

Return values :

State – of WBNE flag (1 active (waiting for data to complete) / 0 not active (buffer empty or full)).

uint32_t LL_FLASH_IsActiveFlag_DBNE ( const FLASH_TypeDef * flashx )

Check if the data buffer not empty flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR DBNE LL_FLASH_IsActiveFlag_DBNE

Parameters :

flashx – FLASH instance.

Return values :

State – of DBNE flag (1 active (data buffer used, waiting) / 0 not active (buffer not used)).

uint32_t LL_FLASH_IsActiveFlag_OEMLOCK ( const FLASH_TypeDef * flashx )

Check if the OEM key lock mechanism is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR OEMLOCK LL_FLASH_IsActiveFlag_OEMLOCK

Parameters :

flashx – FLASH instance.

Return values :

State – of OEMLOCK flag (1: OEM key locked / 0: OEM key is virgin).

uint32_t LL_FLASH_IsActiveFlag_BSLOCK ( const FLASH_TypeDef * flashx )

Check if the BS key lock mechanism is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR BSLOCK LL_FLASH_IsActiveFlag_BSLOCK

Parameters :

flashx – FLASH instance.

Return values :

State – of BSLOCK flag (1: BS key locked / 0: BS key is default).

uint32_t LL_FLASH_IsActiveFlag_EOP ( const FLASH_TypeDef * flashx )

Check if the flash end of operation flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR EOP LL_FLASH_IsActiveFlag_EOP

Parameters :

flashx – FLASH instance.

Return values :

State – of EOP flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_EOP ( FLASH_TypeDef * flashx )

Clear the flash end of operation error flag.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CLR_EOP LL_FLASH_ClearFlag_EOP

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsActiveFlag_WRPERR ( const FLASH_TypeDef * flashx )

Check if the flash write protection error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR WRPERR LL_FLASH_IsActiveFlag_WRPERR

Parameters :

flashx – FLASH instance.

Return values :

State – of WRPERR flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_WRPERR ( FLASH_TypeDef * flashx )

Clear the flash write protection error flag.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CLR_WRPERR LL_FLASH_ClearFlag_WRPERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsActiveFlag_PGSERR ( const FLASH_TypeDef * flashx )

Check if the flash programming sequence error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR PGSERR LL_FLASH_IsActiveFlag_PGSERR

Parameters :

flashx – FLASH instance.

Return values :

State – of PGSERR flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_PGSERR ( FLASH_TypeDef * flashx )

Clear the flash programming sequence error flag.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CLR_PGSERR LL_FLASH_ClearFlag_PGSERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsActiveFlag_STRBERR ( const FLASH_TypeDef * flashx )

Check if the flash strobe error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR STRBERR LL_FLASH_IsActiveFlag_STRBERR

Parameters :

flashx – FLASH instance.

Return values :

State – of STRBERR flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_STRBERR ( FLASH_TypeDef * flashx )

Clear the flash strobe error flag.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CLR_STRBERR LL_FLASH_ClearFlag_STRBERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsActiveFlag_INCERR ( const FLASH_TypeDef * flashx )

Check if the flash inconsistency error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR INCERR LL_FLASH_IsActiveFlag_INCERR

Parameters :

flashx – FLASH instance.

Return values :

State – of INCERR flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_INCERR ( FLASH_TypeDef * flashx )

Clear the flash inconsistency error flag.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CLR_INCERR LL_FLASH_ClearFlag_INCERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsActiveFlag_OPTCHANGEERR ( const FLASH_TypeDef * flashx )

Check if the flash option-byte change error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

SR OPTCHANGEERR LL_FLASH_IsActiveFlag_OPTCHANGEERR

Parameters :

flashx – FLASH instance.

Return values :

State – of OPTCHANGEERR flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_OPTCHANGEERR ( FLASH_TypeDef * flashx )

Clear the flash option-byte change error flag.

Reference Manual to LL API cross reference (Register Field Functions)

CCR CLR_OPTCHANGEERR LL_FLASH_ClearFlag_OPTCHANGEERR

Parameters :

flashx – FLASH instance.

LL FLASH Operation and Control Functions

group FLASH_LL_EF_Control

Functions

void LL_FLASH_Lock ( FLASH_TypeDef * flashx )

Lock the flash control assess registers.

Reference Manual to LL API cross reference (Register Field Functions)

CR LOCK LL_FLASH_Lock

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsLocked ( const FLASH_TypeDef * flashx )

Check the flash control access registers lock state.

Reference Manual to LL API cross reference (Register Field Functions)

CR LOCK LL_FLASH_IsLocked

Parameters :

flashx – FLASH instance.

Return values :

State – of flash lock (1 locked / 0 unlocked).

void LL_FLASH_EnableProgramming ( FLASH_TypeDef * flashx )

Enable the flash programming.

Reference Manual to LL API cross reference (Register Field Functions)

CR PG LL_FLASH_EnableProgramming

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableProgramming ( FLASH_TypeDef * flashx )

Disable the flash programming.

Reference Manual to LL API cross reference (Register Field Functions)

CR PG LL_FLASH_DisableProgramming

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledProgramming ( const FLASH_TypeDef * flashx )

Check if the flash programming is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR PG LL_FLASH_IsEnabledProgramming

Parameters :

flashx – FLASH instance.

Return values :

State – of flash programming (1 enabled / 0 disabled).

void LL_FLASH_EnablePageErase ( FLASH_TypeDef * flashx )

Enable the flash page erase.

Reference Manual to LL API cross reference (Register Field Functions)

CR PER LL_FLASH_EnablePageErase

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisablePageErase ( FLASH_TypeDef * flashx )

Disable the flash page erase.

Reference Manual to LL API cross reference (Register Field Functions)

CR PER LL_FLASH_DisablePageErase

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledPageErase ( const FLASH_TypeDef * flashx )

Check if the flash page erase is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR PER LL_FLASH_IsEnabledPageErase

Parameters :

flashx – FLASH instance.

Return values :

State – of flash page erase (1 enabled / 0 disabled).

void LL_FLASH_EnableBankErase ( FLASH_TypeDef * flashx , uint32_t bank )

Enable the flash bank erase.

Reference Manual to LL API cross reference (Register Field Functions)

CR BKSEL/BER LL_FLASH_EnableBankErase

Parameters :
void LL_FLASH_DisableBankErase ( FLASH_TypeDef * flashx , uint32_t bank )

Disable the flash bank erase.

Reference Manual to LL API cross reference (Register Field Functions)

CR BKSEL/BER LL_FLASH_DisableBankErase

Parameters :
uint32_t LL_FLASH_IsEnabledBankErase ( const FLASH_TypeDef * flashx , const uint32_t bank )

Check if the flash bank erase is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR BKSEL/BER LL_FLASH_IsEnabledBankErase

Parameters :
Return values :

State – of flash mass erase (1 enabled / 0 disabled).

void LL_FLASH_EnableMassErase ( FLASH_TypeDef * flashx )

Enable the flash mass erase.

Reference Manual to LL API cross reference (Register Field Functions)

CR MER LL_FLASH_EnableMassErase

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableMassErase ( FLASH_TypeDef * flashx )

Disable the flash mass erase.

Reference Manual to LL API cross reference (Register Field Functions)

CR MER LL_FLASH_DisableMassErase

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledMassErase ( const FLASH_TypeDef * flashx )

Check if the flash mass erase is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR MER LL_FLASH_IsEnabledMassErase

Parameters :

flashx – FLASH instance.

Return values :

State – of flash mass erase (1 enabled / 0 disabled).

void LL_FLASH_DisableAllOperation ( FLASH_TypeDef * flashx )

Disable all flash operation.

Reference Manual to LL API cross reference (Register Field Functions)

NSCR/SECCR PG/PER/MER1/MER2 LL_FLASH_DisableAllOperation

Parameters :

flashx – FLASH instance.

void LL_FLASH_EnableForceWrite ( FLASH_TypeDef * flashx )

Enable the flash force-write operation.

Reference Manual to LL API cross reference (Register Field Functions)

CR FW LL_FLASH_EnableForceWrite

Parameters :

flashx – FLASH instance.

void LL_FLASH_StartEraseOperation ( FLASH_TypeDef * flashx )

Start the flash erase operation.

Reference Manual to LL API cross reference (Register Field Functions)

CR STRT LL_FLASH_StartEraseOperation

Parameters :

flashx – FLASH instance.

void LL_FLASH_SetPageEraseIndex ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t area , uint32_t page )

Set the flash page erase index.

Reference Manual to LL API cross reference (Register Field Functions)

CR BKSEL/EDATASEL/PNB LL_FLASH_SetPageEraseIndex

Parameters :
void LL_FLASH_StartErasePage ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t area , uint32_t page )

Start the flash erase page.

Reference Manual to LL API cross reference (Register Field Functions)

CR BKER/EDATASEL/PNB/PER/STRT LL_FLASH_StartErasePage

Parameters :
void LL_FLASH_StartEraseBank ( FLASH_TypeDef * flashx , uint32_t bank )

Start the flash erase bank.

Reference Manual to LL API cross reference (Register Field Functions)

CR BKSEL/STRT/BER LL_FLASH_StartEraseBank

Parameters :
void LL_FLASH_StartMassErase ( FLASH_TypeDef * flashx )

Start the flash erase bank.

Reference Manual to LL API cross reference (Register Field Functions)

CR BER/STRT LL_FLASH_StartMassErase

Parameters :

flashx – FLASH instance.

void LL_FLASH_EnableIT ( FLASH_TypeDef * flashx , uint32_t interrupt )

Enable the flash interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR EOPIE/WRPERRIE/PGSERRIE/STRBERRIE/INCERRIE/OPTCHANGEERRIE LL_FLASH_EnableIT

Parameters :
void LL_FLASH_DisableIT ( FLASH_TypeDef * flashx , uint32_t interrupt )

Disable the flash interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR EOPIE/WRPERRIE/PGSERRIE/STRBERRIE/INCERRIE/OPTCHANGEERRIE LL_FLASH_DisableIT

Parameters :
void LL_FLASH_EnableIT_EOP ( FLASH_TypeDef * flashx )

Enable the flash end of operation interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR EOPIE LL_FLASH_EnableIT_EOP

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_EOP ( FLASH_TypeDef * flashx )

Disable the flash end of operation interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR EOPIE LL_FLASH_DisableIT_EOP

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_EOP ( const FLASH_TypeDef * flashx )

Check if the flash end of operation interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR EOPIE LL_FLASH_IsEnabledIT_EOP

Parameters :

flashx – FLASH instance.

Return values :

State – of flash EOP interruption (1 enabled / 0 disabled).

void LL_FLASH_EnableIT_WRPERR ( FLASH_TypeDef * flashx )

Enable the flash write protection error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR WRPERRIE LL_FLASH_EnableIT_WRPERR

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_WRPERR ( FLASH_TypeDef * flashx )

Disable the flash write protection error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR WRPERRIE LL_FLASH_DisableIT_WRPERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_WRPERR ( const FLASH_TypeDef * flashx )

Check if the flash write protection error interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR WRPERRIE LL_FLASH_IsEnabledIT_WRPERR

Parameters :

flashx – FLASH instance.

Return values :

State – of flash WRPERR interruption (1 enabled / 0 disabled).

void LL_FLASH_EnableIT_PGSERR ( FLASH_TypeDef * flashx )

Enable the flash programming sequence error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR PGSERRIE LL_FLASH_EnableIT_PGSERR

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_PGSERR ( FLASH_TypeDef * flashx )

Disable the flash programming sequence error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR PGSERRIE LL_FLASH_DisableIT_PGSERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_PGSERR ( const FLASH_TypeDef * flashx )

Check if the flash programming sequence error interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR PGSERRIE LL_FLASH_IsEnabledIT_PGSERR

Parameters :

flashx – FLASH instance.

Return values :

State – of flash PGSERR interruption (1 enabled / 0 disabled).

void LL_FLASH_EnableIT_STRBERR ( FLASH_TypeDef * flashx )

Enable the flash strobe error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR STRBERRIE LL_FLASH_EnableIT_STRBERR

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_STRBERR ( FLASH_TypeDef * flashx )

Disable the flash strobe error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR STRBERRIE LL_FLASH_DisableIT_STRBERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_STRBERR ( const FLASH_TypeDef * flashx )

Check if the flash strobe error interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR STRBERRIE LL_FLASH_IsEnabledIT_STRBERR

Parameters :

flashx – FLASH instance.

Return values :

State – of flash STRBERR interruption (1 enabled / 0 disabled).

void LL_FLASH_EnableIT_INCERR ( FLASH_TypeDef * flashx )

Enable the flash inconsistency error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR INCERRIE LL_FLASH_EnableIT_INCERR

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_INCERR ( FLASH_TypeDef * flashx )

Disable the flash inconsistency error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR INCERRIE LL_FLASH_DisableIT_INCERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_INCERR ( const FLASH_TypeDef * flashx )

Check if the flash inconsistency error interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR INCERRIE LL_FLASH_IsEnabledIT_INCERR

Parameters :

flashx – FLASH instance.

Return values :

State – of flash INCERR interruption (1 enabled / 0 disabled).

void LL_FLASH_EnableIT_OPTCHANGEERR ( FLASH_TypeDef * flashx )

Enable the flash option-byte change error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR OPTCHANGEERRIE LL_FLASH_EnableIT_OPTCHANGEERR

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_OPTCHANGEERR ( FLASH_TypeDef * flashx )

Disable the flash option-byte change error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

CR OPTCHANGEERRIE LL_FLASH_DisableIT_OPTCHANGEERR

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_OPTCHANGEERR ( const FLASH_TypeDef * flashx )

Check if the flash option-byte change error interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR OPTCHANGEERRIE LL_FLASH_IsEnabledIT_OPTCHANGEERR

Parameters :

flashx – FLASH instance.

Return values :

State – of flash OPTCHANGEERR interruption (1 enabled / 0 disabled).

void LL_FLASH_SetPrivAttr ( FLASH_TypeDef * flashx , uint32_t item , uint32_t priv_attr )

Set the privilege attribute.

Reference Manual to LL API cross reference (Register Field Functions)

PRIVCFGR PRIV LL_FLASH_SetPrivAttr

Note

This register can be written only when the access is privileged.

Parameters :
uint32_t LL_FLASH_GetPrivAttr ( const FLASH_TypeDef * flashx , uint32_t item )

Get the privilege attribute.

Reference Manual to LL API cross reference (Register Field Functions)

PRIVCFGR PRIV LL_FLASH_GetPrivAttr

Parameters :
  • flashx – FLASH instance.

  • item – The item attribute to be queried. This parameter can be one of the following values:

Returns :

Returned value can be one of the following values:

void LL_FLASH_SetHDPExtArea ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t page_nbr )

Set the flash page configuration for extended hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDPEXTR HDP1_EXT/HDP2_EXT LL_FLASH_SetHDPExtArea

Parameters :
  • flashx – FLASH instance.

  • bank – This parameter can be one of the following values:

  • page_nbr – This parameter can be a value between 0x00U and the maximum number of pages by bank.

uint32_t LL_FLASH_GetHDPExtArea ( const FLASH_TypeDef * flashx , const uint32_t bank )

Get the flash page configuration for extended hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDPEXTR HDP1_EXT/HDP2_EXT LL_FLASH_GetHDPExtArea

Parameters :
Return values :

Returned – value can be a value between 0x00U and the maximum number of pages by bank.

LL FLASH Option Bytes Management

group FLASH_LL_EF_OB_Management

Functions

void LL_FLASH_OB_SetIWDGSelection ( FLASH_TypeDef * flashx , uint32_t hw_sw_selection )

Set the flash independent watchdog selection.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR IWDG_SW LL_FLASH_OB_SetIWDGSelection

Parameters :
uint32_t LL_FLASH_OB_GetIWDGSelection ( const FLASH_TypeDef * flashx )

Get the flash independent watchdog selection.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR IWDG_SW LL_FLASH_OB_GetIWDGSelection

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetWWDGSelection ( FLASH_TypeDef * flashx , uint32_t hw_sw_selection )

Set the flash window watchdog selection.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG WWDG_SW LL_FLASH_OB_SetWWDGSelection

Parameters :
uint32_t LL_FLASH_OB_GetWWDGSelection ( const FLASH_TypeDef * flashx )

Get the flash window watchdog selection.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR WWDG_SW LL_FLASH_OB_GetWWDGSelection

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetNRSTStopMode ( FLASH_TypeDef * flashx , uint32_t rst_generation )

Set the flash reset generation in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG NRST_STOP LL_FLASH_OB_SetNRSTStopMode

Parameters :
uint32_t LL_FLASH_OB_GetNRSTStopMode ( const FLASH_TypeDef * flashx )

Get the flash reset generation in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR NRST_STOP LL_FLASH_OB_GetNRSTStopMode

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetNRSTStandbyMode ( FLASH_TypeDef * flashx , uint32_t rst_generation )

Set the flash reset generation in standby mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG NRST_STDBY LL_FLASH_OB_SetNRSTStandbyMode

Parameters :
uint32_t LL_FLASH_OB_GetNRSTStandbyMode ( const FLASH_TypeDef * flashx )

Get the flash reset generation in standby mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR NRST_STDBY LL_FLASH_OB_GetNRSTStandbyMode

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetRDPLevel ( FLASH_TypeDef * flashx , uint32_t rdp_level )

Set the flash RDP level.

Reference Manual to LL API cross reference (Register Field Functions)

OPSR_PRG RDP_LEVEL LL_FLASH_OB_SetRDPLevel

Parameters :
uint32_t LL_FLASH_OB_GetRDPLevel ( const FLASH_TypeDef * flashx )

Get the flash RDP level.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PGR RDP_LEVEL LL_FLASH_OB_GetRDPLevel

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_FreezeIWDGStopMode ( FLASH_TypeDef * flashx )

Freeze the flash independent watchdog counter in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG IWDG_STOP LL_FLASH_OB_FreezeIWDGStopMode

Parameters :

flashx – FLASH instance.

void LL_FLASH_OB_UnfreezeIWDGStopMode ( FLASH_TypeDef * flashx )

Unfreeze the flash independent watchdog counter in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG IWDG_STOP LL_FLASH_OB_UnfreezeIWDGStopMode

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsFrozenIWDGStopMode ( const FLASH_TypeDef * flashx )

Check the flash independent watchdog counter in stop mode is frozen.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR IWDG_STOP LL_FLASH_OB_IsFrozenIWDGStopMode

Parameters :

flashx – FLASH instance.

Return values :

State – of flash option bytes IWDG counter in stop mode (1 frozen / 0 not frozen).

void LL_FLASH_OB_FreezeIWDGStandbyMode ( FLASH_TypeDef * flashx )

Freeze the flash independent watchdog counter in standby mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG IWDG_STDBY LL_FLASH_OB_FreezeIWDGStandbyMode

Parameters :

flashx – FLASH instance.

void LL_FLASH_OB_UnfreezeIWDGStandbyMode ( FLASH_TypeDef * flashx )

Unfreeze the flash independent watchdog counter in standby mode.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG IWDG_STDBY LL_FLASH_OB_UnfreezeIWDGStandbyMode

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsFrozenIWDGStandbyMode ( const FLASH_TypeDef * flashx )

Check the flash independent watchdog counter in standby mode is frozen.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR IWDG_STDBY LL_FLASH_OB_IsFrozenIWDGStandbyMode

Parameters :

flashx – FLASH instance.

Return values :

State – of flash option bytes IWDG counter in standby mode (1 frozen / 0 not frozen).

void LL_FLASH_OB_SetBoot0SourceSelection ( FLASH_TypeDef * flashx , uint32_t boot_sel )

Set the flash software boot0.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG BOOT_SEL LL_FLASH_OB_SetBoot0SourceSelection

Parameters :
  • flashx – FLASH instance.

  • boot_sel – This parameter can be one of the following values:

uint32_t LL_FLASH_OB_GetBoot0SourceSelection ( const FLASH_TypeDef * flashx )

Get the flash software boot0.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR BOOT_SEL LL_FLASH_OB_GetBoot0SourceSelection

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetBoot0 ( FLASH_TypeDef * flashx , uint32_t boot0 )

Set the flash BOOT0 option bit.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG BOOT0 LL_FLASH_OB_SetBoot0

Parameters :
uint32_t LL_FLASH_OB_GetBoot0 ( const FLASH_TypeDef * flashx )

Get the flash BOOT0 option bit.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR BOOT0 LL_FLASH_OB_GetBoot0

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetBoot0Config ( FLASH_TypeDef * flashx , uint32_t boot0 )

Set the flash NBOOT0 option bit.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG BOOT_SEL|BOOT0 LL_FLASH_OB_SetBoot0Config

Parameters :
uint32_t LL_FLASH_OB_GetBoot0Config ( const FLASH_TypeDef * flashx )

Get the flash NBOOT0 option bit.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR BOOT_SEL|BOOT0 LL_FLASH_OB_GetBoot0Config

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_EnableEDATAArea ( FLASH_TypeDef * flashx )

Enable the data flash area.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG EDATA_EN LL_FLASH_OB_EnableEDATAArea

Parameters :

flashx – FLASH instance.

void LL_FLASH_OB_DisableEDATAArea ( FLASH_TypeDef * flashx )

Disable the data flash area.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG EDATA_EN LL_FLASH_OB_DisableEDATAArea

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsEnabledEDATAArea ( const FLASH_TypeDef * flashx )

Check if the data flash area is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR EDATA_EN LL_FLASH_OB_IsEnabledEDATAArea

Parameters :

flashx – FLASH instance.

Return values :

State – of flash option bit EDATA_EN (1 enabled / 0 disabled).

void LL_FLASH_OB_SetBank ( FLASH_TypeDef * flashx , uint32_t single_dual_bank )

Set the single/dual bank configuration for products with less user memory.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG SINGLE_BANK LL_FLASH_OB_SetBank

Parameters :
uint32_t LL_FLASH_OB_GetBank ( const FLASH_TypeDef * flashx )

Get the single/dual bank configuration for products with less of user memory.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR SINGLE_BANK LL_FLASH_OB_GetBank

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetSwapBank ( FLASH_TypeDef * flashx , uint32_t swap_bank )

Set the flash swap banks.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_PRG SWAP_BANK LL_FLASH_OB_SetSwapBank

Parameters :
uint32_t LL_FLASH_OB_GetSwapBank ( const FLASH_TypeDef * flashx )

Get the flash swap banks.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR_CUR SWAP_BANK LL_FLASH_OB_GetSwapBank

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_SetSystemResetSRAM1Erase ( FLASH_TypeDef * flashx , uint32_t erase_sram )

Set the flash erase SRAM1 upon system reset.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_PRG SRAM1_RST LL_FLASH_OB_SetSystemResetSRAM1Erase

Parameters :
uint32_t LL_FLASH_OB_GetSystemResetSRAM1Erase ( const FLASH_TypeDef * flashx )

Get the flash erase SRAM1 upon system reset.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_CUR SRAM1_RST LL_FLASH_OB_GetSystemResetSRAM1Erase

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_EnableECCSRAM2 ( FLASH_TypeDef * flashx )

Enable the flash SRAM2 ECC.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_PRG SRAM2_ECC LL_FLASH_OB_EnableECCSRAM2

Parameters :

flashx – FLASH instance.

void LL_FLASH_OB_DisableECCSRAM2 ( FLASH_TypeDef * flashx )

Disable the flash SRAM2 ECC.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_PRG SRAM2_ECC LL_FLASH_OB_DisableECCSRAM2

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsEnabledECCSRAM2 ( const FLASH_TypeDef * flashx )

Check if the flash SRAM2 ECC is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_CUR SRAM2_ECC LL_FLASH_OB_IsEnabledECCSRAM2

Parameters :

flashx – FLASH instance.

Return values :

State – of flash option bytes ECCSRAM2 (1 enabled / 0 disabled).

void LL_FLASH_OB_SetSystemResetSRAM2Erase ( FLASH_TypeDef * flashx , uint32_t erase_sram2 )

Set the flash SRAM2 erase upon system reset.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_PRG SRAM2_RST LL_FLASH_OB_SetSystemResetSRAM2Erase

Parameters :
uint32_t LL_FLASH_OB_GetSystemResetSRAM2Erase ( const FLASH_TypeDef * flashx )

Get the flash SRAM2 erase upon system reset.

Reference Manual to LL API cross reference (Register Field Functions)

OPTSR2_CUR SRAM2_RST LL_FLASH_OB_GetSystemResetSRAM2Erase

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be one of the following values:

void LL_FLASH_OB_LockBootConfig ( FLASH_TypeDef * flashx )

Lock the flash boot address.

Reference Manual to LL API cross reference (Register Field Functions)

SECBOOTR BOOT_LOCK LL_FLASH_OB_LockBootConfig

Parameters :

flashx – FLASH instance.

void LL_FLASH_OB_UnlockBootConfig ( FLASH_TypeDef * flashx )

Unlock the flash boot address.

Reference Manual to LL API cross reference (Register Field Functions)

BOOTR BOOT_LOCK LL_FLASH_OB_UnlockBootConfig

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_OB_IsLockedBootConfig ( const FLASH_TypeDef * flashx )

Check the flash boot address lock state.

Reference Manual to LL API cross reference (Register Field Functions)

BOOTR BOOT_LOCK LL_FLASH_OB_IsLockedBootConfig

Parameters :

flashx – FLASH instance.

Return values :

State – of boot address lock ( 1: locked, 0 unlocked)

void LL_FLASH_OB_SetBootAddr ( FLASH_TypeDef * flashx , uint32_t boot_addr )

Set the flash boot base address.

Reference Manual to LL API cross reference (Register Field Functions)

BOOTR_PRG BOOTADD LL_FLASH_OB_SetBootAddr

Parameters :
  • flashx – FLASH instance.

  • boot_addr – This parameter can be a value between 0x00000000U and 0xFFFFFFFFU.

uint32_t LL_FLASH_OB_GetBootAddr ( const FLASH_TypeDef * flashx )

Get the flash boot base address.

Reference Manual to LL API cross reference (Register Field Functions)

BOOTR_CUR BOOTADD LL_FLASH_OB_GetBootAddr

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be a value between 0x00000000U and 0xFFFFFFFFU.

void LL_FLASH_OB_LockOTPBlock ( FLASH_TypeDef * flashx , uint32_t block )

Enable the flash OTP locking protection for the selected blocks.

Reference Manual to LL API cross reference (Register Field Functions)

OTPBLR_PRG LOCKBL LL_FLASH_OB_LockOTPBlock

Parameters :
  • flashx – FLASH instance.

  • block – specifies the OTP blocks to be locked. This parameter can be any combination of FLASH OTP Lock Blocks possible values.

uint32_t LL_FLASH_OB_IsLockedOTPBlock ( const FLASH_TypeDef * flashx , const uint32_t block )

Get the flash OTP locking protection by block.

Reference Manual to LL API cross reference (Register Field Functions)

OTPBLR_CUR LOCKBL LL_FLASH_OB_IsLockedOTPBlock

Parameters :
  • flashx – FLASH instance.

  • block – specifies the OTP blocks to check. This parameter can be any combination of FLASH OTP Lock Blocks possible values.

Return values :

1 – if all blocks specified by blocks are locked, 0 otherwise.

void LL_FLASH_OB_SetBootloaderInterfaceConfig ( FLASH_TypeDef * flashx , uint32_t bootloader_config )

Set the bootloader interface configuration.

Reference Manual to LL API cross reference (Register Field Functions)

BL_COM_CFGR BL_COM_CFG LL_FLASH_OB_SetBootloaderInterfaceConfig

Parameters :
  • flashx – FLASH instance.

  • bootloader_config – specifies the bootloader interface configuration to set. This parameter can be any value between 0x00000000 and 0xFFFFFFFF.

uint32_t LL_FLASH_OB_GetBootloaderInterfaceConfig ( const FLASH_TypeDef * flashx )

Get the bootloader interface configuration.

Reference Manual to LL API cross reference (Register Field Functions)

BL_COM_CFGR BL_COM_CFG LL_FLASH_OB_GetBootloaderInterfaceConfig

Parameters :

flashx – FLASH instance.

Return values :

Returned – value can be a value between 0x00000000 and 0xFFFFFFFF.

void LL_FLASH_OB_SetOEMKeyWord1 ( FLASH_TypeDef * flashx , uint32_t oem_key_word )

Set the flash OEM key first word.

Reference Manual to LL API cross reference (Register Field Functions)

OEMKEYR1 OEMKEY LL_FLASH_OB_SetOEMKeyWord1

Parameters :
  • flashx – FLASH instance.

  • oem_key_word – First 32-bit word of the 128-bit OEM key value to set

void LL_FLASH_OB_SetOEMKeyWord2 ( FLASH_TypeDef * flashx , uint32_t oem_key_word )

Set the flash OEM key second word.

Reference Manual to LL API cross reference (Register Field Functions)

OEMKEYR2 OEMKEY LL_FLASH_OB_SetOEMKeyWord2

Parameters :
  • flashx – FLASH instance.

  • oem_key_word – Second 32-bit word of the 128-bit OEM key value to set

void LL_FLASH_OB_SetOEMKeyWord3 ( FLASH_TypeDef * flashx , uint32_t oem_key_word )

Set the flash OEM key third word.

Reference Manual to LL API cross reference (Register Field Functions)

OEMKEYR3 OEMKEY LL_FLASH_OB_SetOEMKeyWord3

Parameters :
  • flashx – FLASH instance.

  • oem_key_word – Third 32-bit word of the 128-bit OEM key value to set

void LL_FLASH_OB_SetOEMKeyWord4 ( FLASH_TypeDef * flashx , uint32_t oem_key_word )

Set the flash OEM key second word.

Reference Manual to LL API cross reference (Register Field Functions)

OEMKEYR4 OEMKEY LL_FLASH_OB_SetOEMKeyWord4

Parameters :
  • flashx – FLASH instance.

  • oem_key_word – Second 32-bit word of the 128-bit OEM key value to set

void LL_FLASH_OB_SetBSKey ( FLASH_TypeDef * flashx , uint32_t bs_key )

Set the flash BS key.

Reference Manual to LL API cross reference (Register Field Functions)

BSKEYR BSKEY LL_FLASH_OB_SetBSKey

Parameters :
  • flashx – FLASH instance.

  • bs_key – BS key value to set

void LL_FLASH_OB_EnablePageWRP ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t page )

Enable the flash write protection on the selected pages of the selected bank.

Reference Manual to LL API cross reference (Register Field Functions)

WRP1R/WRP2R WRP1R_WRPSG/WRP2R_WRPSG LL_FLASH_OB_EnablePageWRP

Parameters :
void LL_FLASH_OB_DisablePageWRP ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t page )

Disable the flash write protection on the selected pages of the selected bank.

Reference Manual to LL API cross reference (Register Field Functions)

WRP1R/WRP2R WRP1R_WRPSG/WRP2R_WRPSG LL_FLASH_OB_DisablePageWRP

Parameters :
uint32_t LL_FLASH_OB_IsEnabledPageWRP ( const FLASH_TypeDef * flashx , const uint32_t bank , uint32_t page )

Get the flash page write protection flags by bank.

Reference Manual to LL API cross reference (Register Field Functions)

WRP1R_PRG/WRP2R_PRG WRP1R_WRPSG/WRP2R_WRPSG LL_FLASH_OB_IsEnabledPageWRP

Parameters :
Return values :

1 – if all pages specified by the page parameter are write protected, 0 otherwise.

void LL_FLASH_OB_SetHDPAreaStartPage ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t page )

Set the flash start page for hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDP1R_PRG/HDP2R_PRG HDP1R_STRT/HDP2R_STRT LL_FLASH_OB_SetHDPAreaStartPage

Parameters :
  • flashx – FLASH instance.

  • bank – This parameter can be one of the following values:

  • page – This parameter can be a value between 0x00U and the maximum number of pages by bank.

uint32_t LL_FLASH_OB_GetHDPAreaStartPage ( const FLASH_TypeDef * flashx , const uint32_t bank )

Get the flash start page for hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDP1R_CUR/HDP2R_CUR HDP1R_STRT/HDP2R_STRT LL_FLASH_OB_GetHDPAreaStartPage

Parameters :
Return values :

Returned – value can be a value between 0x00U and the maximum number of pages by bank.

void LL_FLASH_OB_SetHDPAreaEndPage ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t page )

Set the flash end page for hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDP1R_PRG/HDP2R_PRG HDP1R_END/HDP2R_END LL_FLASH_OB_SetHDPAreaEndPage

Parameters :
  • flashx – FLASH instance.

  • bank – This parameter can be one of the following values:

  • page – This parameter can be a value between 0x00U and the maximum number of pages by bank.

uint32_t LL_FLASH_OB_GetHDPAreaEndPage ( const FLASH_TypeDef * flashx , const uint32_t bank )

Get the flash end page for hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDP1R_CUR/HDP2R_CUR HDP1R_END/HDP2R_END LL_FLASH_OB_GetHDPAreaEndPage

Parameters :
Return values :

Returned – value can be a value between 0x00U and the maximum number of pages by bank.

void LL_FLASH_OB_ConfigHDPArea ( FLASH_TypeDef * flashx , uint32_t bank , uint32_t start_page , uint32_t end_page )

Configure the flash hide protection area by bank.

Reference Manual to LL API cross reference (Register Field Functions)

HDP1R_PRG/HDP2R_PRG HDP1R_END|HDP1R_STRT/HDP2R_END|HDP2R_STRT LL_FLASH_OB_ConfigHDPArea

Parameters :
  • flashx – FLASH instance.

  • bank – This parameter can be one of the following values:

  • start_page – This parameter can be a value between 0x00U and the maximum number of pages by bank.

  • end_page – This parameter can be a value between 0x00U and the maximum number of pages by bank.

LL FLASH ECC Management

group FLASH_LL_EF_ECC_Management

Functions

uint32_t LL_FLASH_GetECCCAddressOffset ( const FLASH_TypeDef * flashx )

Get the flash ECC single-correction error address offset.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR ADDR_ECC LL_FLASH_GetECCCAddressOffset

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : ECC single-correction error address offset.

uint32_t LL_FLASH_IsActiveFlag_EDATA_ECCC ( const FLASH_TypeDef * flashx )

Get the flash ECC single-correction error data flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR EDATA_ECC LL_FLASH_IsActiveFlag_EDATA_ECCC

Parameters :

flashx – FLASH instance.

Return values :

State – of ECC single-correction error data flash flag (1: ECC error in data flash / 0: not in data flash).

uint32_t LL_FLASH_IsActiveFlag_BK_ECCC ( const FLASH_TypeDef * flashx )

Get the flash ECC single-correction error bank flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR BK_ECC LL_FLASH_IsActiveFlag_BK_ECCC

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : ECC error bank (1: ECC error in Bank 2 / 0: ECC error in Bank 1).

uint32_t LL_FLASH_IsActiveFlag_SYSF_ECCC ( const FLASH_TypeDef * flashx )

Get the flash ECC single-correction error system flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR SYSF_ECC LL_FLASH_IsActiveFlag_SYSF_ECCC

Parameters :

flashx – FLASH instance.

Return values :

State – of ECC single-correction error system flash flag (1: ECC error in system flash / 0: not in system flash).

uint32_t LL_FLASH_IsActiveFlag_OTP_ECCC ( const FLASH_TypeDef * flashx )

Get the flash ECC single-correction error OTP flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR OTP_ECC LL_FLASH_IsActiveFlag_OTP_ECCC

Parameters :

flashx – FLASH instance.

Return values :

State – of ECC single-correction error OTP flash flag (1: ECC error in OTP flash / 0: not in OTP flash).

uint32_t LL_FLASH_ReadFlag_ECCC ( const FLASH_TypeDef * flashx , const uint32_t flags )

Read the state of selected ECCC flags.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR EDATA_ECC|BK_ECC/SYSF_ECC|OTP_ECC LL_FLASH_ReadFlag_ECCC

Parameters :
Return values :

Returned – value : state of ECCC selected flags.

void LL_FLASH_EnableIT_ECCC ( FLASH_TypeDef * flashx )

Enable the flash ECC single-correction error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR ECCCIE LL_FLASH_EnableIT_ECCC

Parameters :

flashx – FLASH instance.

void LL_FLASH_DisableIT_ECCC ( FLASH_TypeDef * flashx )

Disable the flash ECC single-correction error interrupt.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR ECCCIE LL_FLASH_DisableIT_ECCC

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_IsEnabledIT_ECCC ( const FLASH_TypeDef * flashx )

Check if the flash ECC single-correction error interrupt is enabled or disabled.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR ECCCIE LL_FLASH_IsEnabledIT_ECCC

Parameters :

flashx – FLASH instance.

Return values :

State – of flash EOP interruption (1 enabled / 0 disabled).

uint32_t LL_FLASH_IsActiveFlag_ECCC ( const FLASH_TypeDef * flashx )

Check if the flash ECC single-correction error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR ECCC LL_FLASH_IsActiveFlag_ECCC

Parameters :

flashx – FLASH instance.

Return values :

State – of flash ECCC flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_ECCC ( FLASH_TypeDef * flashx )

Clear the flash ECC single-correction error flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCCORR ECCC LL_FLASH_ClearFlag_ECCC

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_GetECCDAddressOffset ( const FLASH_TypeDef * flashx )

Get the flash ECC double error address offset.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR ADDR_ECC LL_FLASH_GetECCDAddressOffset

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : ECC double error address offset.

uint32_t LL_FLASH_IsActiveFlag_EDATA_ECCD ( const FLASH_TypeDef * flashx )

Get the flash ECC double error data flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR EDATA_ECC LL_FLASH_IsActiveFlag_EDATA_ECCD

Parameters :

flashx – FLASH instance.

Return values :

State – of ECC double error data flash flag (1: ECC error in data flash / 0: not in data flash).

uint32_t LL_FLASH_IsActiveFlag_BK_ECCD ( const FLASH_TypeDef * flashx )

Get the flash ECC double error bank flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR BK_ECC LL_FLASH_IsActiveFlag_BK_ECCD

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : ECC error bank (1: ECC error in Bank 2 / 0: ECC error in Bank 1).

uint32_t LL_FLASH_IsActiveFlag_SYSF_ECCD ( const FLASH_TypeDef * flashx )

Get the flash ECC double error system flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR SYSF_ECC LL_FLASH_IsActiveFlag_SYSF_ECCD

Parameters :

flashx – FLASH instance.

Return values :

State – of ECC double error system flash flag (1: ECC error in system flash / 0: not in system flash).

uint32_t LL_FLASH_IsActiveFlag_OTP_ECCD ( const FLASH_TypeDef * flashx )

Get the flash ECC double error OTP flash flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR OTP_ECC LL_FLASH_IsActiveFlag_OTP_ECCD

Parameters :

flashx – FLASH instance.

Return values :

State – of ECC double error OTP flash flag (1: ECC error in OTP flash / 0: not in OTP flash).

uint32_t LL_FLASH_ReadFlag_ECCD ( const FLASH_TypeDef * flashx , const uint32_t flags )

Read the state of selected ECCD flags.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR EDATA_ECC|BK_ECC/SYSF_ECC|OTP_ECC LL_FLASH_ReadFlag_ECCD

Parameters :
Return values :

Returned – value : state of ECCD selected flags.

uint32_t LL_FLASH_IsActiveFlag_ECCD ( const FLASH_TypeDef * flashx )

Check if the flash ECC double error flag is active.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR ECCD LL_FLASH_IsActiveFlag_ECCD

Parameters :

flashx – FLASH instance.

Return values :

State – of flash ECCD flag (1 active / 0 not active).

void LL_FLASH_ClearFlag_ECCD ( FLASH_TypeDef * flashx )

Clear the flash ECC double error flag.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDETR ECCD LL_FLASH_ClearFlag_ECCD

Parameters :

flashx – FLASH instance.

uint32_t LL_FLASH_GetECCDData ( const FLASH_TypeDef * flashx )

Get the flash ECC double error data.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDR DATA_ECC LL_FLASH_GetECCDData

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : ECC error data.

uint32_t LL_FLASH_GetECCDWordNumber ( const FLASH_TypeDef * flashx )

Get the flash ECC double error 16-bit word number.

Reference Manual to LL API cross reference (Register Field Functions)

ECCDR DATA_ADDR_ECC LL_FLASH_GetECCDWordNumber

Parameters :

flashx – FLASH instance.

Return values :

Returned – value : ECC error 16-bit word number.